import component from 'element-plus/es/components/tree-select/src/tree-select-option.mjs'
import  {createRouter, createWebHashHistory} from 'vue-router'

import Index from '~/pages/index.vue'       //引入首页
import Login from '~/pages/login.vue'
import NotFound from '~/pages/404.vue'

const routes = [{       //在数组中配重路由
    path:"/",               //path路径
    component:Index         //组件页面
},{
    path:"/login",
    component:Login
},{ 
    path: '/:pathMatch(.*)*', 
    name: 'NotFound', component: NotFound 
}]

const router = createRouter({
    history: createWebHashHistory(),
    routes:routes
})

export default router   //暴露出去